# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1AnnotatedDataset do
  @moduledoc """
  AnnotatedDataset is a set holding annotations for data in a Dataset. Each labeling task will generate an AnnotatedDataset under the Dataset that the task is requested for.

  ## Attributes

  *   `annotationSource` (*type:* `String.t`, *default:* `nil`) - Output only. Source of the annotation.
  *   `annotationType` (*type:* `String.t`, *default:* `nil`) - Output only. Type of the annotation. It is specified when starting labeling task.
  *   `blockingResources` (*type:* `list(String.t)`, *default:* `nil`) - Output only. The names of any related resources that are blocking changes to the annotated dataset.
  *   `completedExampleCount` (*type:* `String.t`, *default:* `nil`) - Output only. Number of examples that have annotation in the annotated dataset.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time the AnnotatedDataset was created.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Output only. The description of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 10000 characters.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. The display name of the AnnotatedDataset. It is specified in HumanAnnotationConfig when user starts a labeling task. Maximum of 64 characters.
  *   `exampleCount` (*type:* `String.t`, *default:* `nil`) - Output only. Number of examples in the annotated dataset.
  *   `labelStats` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1LabelStats.t`, *default:* `nil`) - Output only. Per label statistics.
  *   `metadata` (*type:* `GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1AnnotatedDatasetMetadata.t`, *default:* `nil`) - Output only. Additional information about AnnotatedDataset.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. AnnotatedDataset resource name in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :annotationSource => String.t() | nil,
          :annotationType => String.t() | nil,
          :blockingResources => list(String.t()) | nil,
          :completedExampleCount => String.t() | nil,
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :exampleCount => String.t() | nil,
          :labelStats =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1LabelStats.t()
            | nil,
          :metadata =>
            GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1AnnotatedDatasetMetadata.t()
            | nil,
          :name => String.t() | nil
        }

  field(:annotationSource)
  field(:annotationType)
  field(:blockingResources, type: :list)
  field(:completedExampleCount)
  field(:createTime, as: DateTime)
  field(:description)
  field(:displayName)
  field(:exampleCount)

  field(:labelStats,
    as: GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1LabelStats
  )

  field(:metadata,
    as:
      GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1AnnotatedDatasetMetadata
  )

  field(:name)
end

defimpl Poison.Decoder,
  for: GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1AnnotatedDataset do
  def decode(value, options) do
    GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1AnnotatedDataset.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1AnnotatedDataset do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
